import request from '@/utils/request'

/**
 * 登录
 *
 * @export
 * @param {*} data { account, password }
 * @returns
 */
export function fetchLogin(data) {
  return request({
    url: '/open/login',
    method: 'post',
    data
  })
}

/**
 * 退出
 *
 * @export
 * @returns
 */
export function fetchLogout() {
  return request({
    url: '/open/out',
    method: 'post'
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}
